RatioInterval<T>
Represents a ratio value that occurs at regular time intervals, enabling conversion between different time periods. This class combines a base time interval (from theSyntax
Inheritance
Constructors
RatioInterval
RatioInterval
Parameters
- ratio decimal: The decimal ratio value that is calculated over the given interval.
- value
T: The duration of the interval. - type IntervalType: The base unit that describes what the quantity of this interval references.
RatioInterval
Parameters
- value
T: The duration of the interval. - type IntervalType: The base unit that describes what the quantity of this interval references.
Properties
Ratio
Returns
decimalMethods
RatioPerDay
Returns
decimal The total ratio value per day as a decimal.RatioPerDay
Parameters
- quantity decimal: The quantity to apply the ratio calculation to.
Returns
decimal The total ratio value per day as a decimal.RatioPerHour
Returns
decimal The total ratio value per hour as a decimal.RatioPerHour
Parameters
- quantity decimal: The quantity to apply the ratio calculation to.
Returns
decimal The total ratio value per hour as a decimal.RatioPerMinute
Returns
decimal The total ratio value per minute as a decimal.RatioPerMinute
Parameters
- quantity decimal: The quantity to apply the ratio calculation to.
Returns
decimal The total ratio value per minute as a decimal.RatioPerMonth
Returns
decimal The total ratio value per month as a decimal.RatioPerMonth
Parameters
- quantity decimal: The quantity to apply the ratio calculation to.
Returns
decimal The total ratio value per month as a decimal.RatioPerWeek
Returns
decimal The total ratio value per week as a decimal.RatioPerWeek
Parameters
- quantity decimal: The quantity to apply the ratio calculation to.
Returns
decimal The total ratio value per week as a decimal.RatioPerYear
Returns
decimal The total ratio value per year as a decimal.RatioPerYear
Parameters
- quantity decimal: The quantity to apply the ratio calculation to.
Returns
decimal The total ratio value per year as a decimal.Remarks
- Value: Always represents a time duration (e.g., 1.5 hours, 2 days)
- Type: The time unit for the Value (Hours, Days, Months, etc.)
- Ratio: The decimal ratio that occurs each interval period
- Per* methods (inherited): Calculate how many intervals fit in a time period
- RatioPer* methods: Calculate total ratio value for a time period (intervals × ratio)
- Conversion rates: “Convert 70% of leads every 2 weeks”
- Performance metrics: “Achieve 0.95 efficiency ratio every 8 hours”
- Quality metrics: “Maintain 0.99 success ratio every day”